{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}

{% block page_title %}我的收藏{% endblock %}

{% block page_content%}
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-3 col-md-2 sidebar">
                </div>
                <div class="col-sm-3 col-md-12 main">
                <h2 class="page-header">收藏夹</h2>
                <div class="table-responsive">
                    {% if blogs %}
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th class="th-left">标题</th>
                                <th class="th-left">类型</th>
                                <th>发表日期</th>
                                <th>评论数</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for blog in blogs %}
                            {% if blog.id != 998 %}
                            <tr>
                                <td class="th-left"><a href="{{ url_for('main.blog', id=blog.id) }}">{{ blog.name[:30] }}</a></td>
                                <td class="th-left">
                                    {% for lab in blog.labels %}
                                    {{ lab.name }}&nbsp;
                                    {% endfor%}
                                </td>
                                <td>{{ moment(blog.create_at).format('YYYY-MM-DD hh:mm:ss') }}</td>
                                <td>{{ blog.comments.count() }}</td>
                                <td>
                                    <a href="{{ url_for('manage.disable_collect', id=blog.id, page=page, info='manage') }}"><span class="glyphicon glyphicon-heart" aria-hidden="true"></span> 取消收藏</a>
                            </tr>
                            {% endif %}
                            {% endfor %}
                        </tbody>
                    </table>
                    {% else %}
                    <br>  
                    <br>  
                    <br>
                    <h4>这里空空如也...<a href="{{ url_for('main.index') }}">返回主页</a></h4>
                    <br>  
                    <br>
                    <br>
                    {% endif %}       
                </div>
            </div>
        </div>
    </div>
{% if pagination.items %}
<div class="pagination-manage">
    <div class="pagination-Nav">
        {{ macros.pagination_widget(pagination, 'manage.manage_blogs') }}
    </div>
</div>
{% endif %}
{% endblock %}